home *** CD-ROM | disk | FTP | other *** search
- global gGlobalStepCount, gcurrentfullrecord, oIndexScroller, gPreStyledFlag, gdescfieldscriptcast, gdescfield, gOurFontK, gStyleCountThreshold, gStyleProgressCount, gHotLinkList, gMACListenStatus, oTextScroller, gIndxScrollFldK, gchunksize, gFirstHotWord, gModeState, gdescfieldspr, gKeyCount, gPrevWord, gkeylist, gStylingNeedF, gWordStyleCount, gStylePermitF
-
- on hPrepStyles pthefld
- put " " into field pthefld
- set the textFont of field pthefld to gOurFontK
- set the textStyle of field pthefld to "plain"
- end
-
- on hResetDescFld
- set gdescfield to the number of cast "F1"
- set the castNum of sprite gdescfieldspr to gdescfield
- updateStage()
- end
-
- on hPrepIndexList parm
- global gkeylist
- set gkeylist to []
- sort(gkeylist)
- if parm = EMPTY then
- end if
- do("set gKeylist=[" & parm & "]")
- set gKeyCount to count(gkeylist)
- hMakeHotLinkList()
- end
-
- on hMakeHotLinkList
- set gHotLinkList to [:]
- repeat with i = 1 to gKeyCount
- set Lstyletype to getAt(getAt(gkeylist, i), 2)
- if (Lstyletype = #b) or (Lstyletype = #bi) then
- set Lchunksize to getAt(getAt(gkeylist, i), 1)
- set Lfirstword to getPropAt(gkeylist, i)
- repeat with n = 1 to Lchunksize
- addProp(gHotLinkList, Lfirstword + n - 1, i)
- end repeat
- end if
- end repeat
- end
-
- on hSetStylingNeed pX
- set gStylingNeedF to pX
- end
-
- on hSetStylePermit pX
- set gStylePermitF to pX
- end
-
- on hSetFormat
- set tidl to the itemDelimiter
- set the itemDelimiter to RETURN
- set the textStyle of item 2 of field gdescfield to "plain"
- set the itemDelimiter to tidl
- if gKeyCount > 0 then
- set gWordStyleCount to 0
- set gStyleProgressCount to 0
- set gStyleCountThreshold to 225
- hSetStylingNeed(1)
- end if
- end
-
- on hStyleMe
- if not gStylePermitF then
- return
- end if
- hSysAlert(#null)
- hWinVoiceMicOff()
- repeat while not (the mouseDown)
- if not gStylePermitF then
- exit repeat
- end if
- if gWordStyleCount >= gKeyCount then
- set LimDone to 1
- hSetStylingNeed(0)
- hSetStylePermit(0)
- hSysAlert(#LCARSREADY)
- hWinVoiceMicOn()
- exit repeat
- else
- set LimDone to 0
- end if
- set gWordStyleCount to gWordStyleCount + 1
- set i to gWordStyleCount
- if gStyleProgressCount >= gStyleCountThreshold then
- hSetStylingNeed(0)
- hSysAlert(#LCARSREADY)
- hWinVoiceMicOn()
- exit repeat
- end if
- set W1 to getPropAt(gkeylist, i)
- set wordinfo to getAt(gkeylist, i)
- set LsavetoLexF to 0
- set numwords to getAt(wordinfo, 1)
- set wordstyle to getAt(wordinfo, 2)
- if wordstyle = #b then
- hDoTheStyle(W1, numwords, "bold", 1)
- next repeat
- end if
- if wordstyle = #i then
- hDoTheStyle(W1, numwords, "italic", 0)
- next repeat
- end if
- if wordstyle = #bi then
- hDoTheStyle(W1, numwords, "bold, italic", 1)
- next repeat
- end if
- if wordstyle = #u then
- hDoTheStyle(W1, numwords, "underline", 0)
- next repeat
- end if
- if wordstyle = #p then
- hDoTheStyle(W1, numwords, "plain", 0)
- next repeat
- end if
- if wordstyle = #iu then
- hDoTheStyle(W1, numwords, "italic,underline", 0)
- end if
- end repeat
- if gMACListenStatus then
- hAppendLinkstoLanguage()
- end if
- hShowEmbeddedHits()
- hSysAlert(#LCARSREADY)
- return LimDone
- end
-
- on hDoTheStyle pw1, pNofW, pWS, pSaveFlag
- set wLast to pw1 + pNofW - 1
- set the textStyle of word pw1 to wLast of field gdescfield to pWS
- if gMACListenStatus and (pSaveFlag = 1) then
- hAppendLexicon(pw1, wLast)
- end if
- set gStyleProgressCount to wLast
- end
-
- on hDisplayEntryname theitem
- set fieldpointer to char 1 of theitem
- if (fieldpointer < 1) or (fieldpointer > 6) then
- return
- end if
- delete char 1 of theitem
- set tidl to the itemDelimiter
- set the itemDelimiter to RETURN
- put theitem into item value(fieldpointer) of field gdescfield
- put RETURN after field gdescfield
- set the itemDelimiter to tidl
- end
-
- on hDisplayBodyText thetext
- set tidl to the itemDelimiter
- set the itemDelimiter to "@"
- set Lcode to char 1 of item 1 of thetext
- delete char 1 of item 1 of thetext
- set the itemDelimiter to RETURN
- put thetext into item value(Lcode) of field gdescfield
- set the itemDelimiter to tidl
- mStoreMyInfo(oTextScroller, gdescfield)
- mAdjustTopHopper(oTextScroller)
- end
-
- on hDisplayPrestyledTxt
- set the castNum of sprite gdescfieldspr to gPreStyledFlag
- set gdescfield to gPreStyledFlag
- updateStage()
- mStoreMyInfo(oTextScroller, gdescfield)
- mAdjustTopHopper(oTextScroller)
- set gWordStyleCount to gKeyCount
- hSetStylingNeed(0)
- hSetStylePermit(0)
- if gMACListenStatus then
- hAppendLexiconfromList(value(field (gPreStyledFlag + 1)))
- end if
- end
-
- on hHiliteItem pNumb
- if pNumb = 0 then
- set the textStyle of field gIndxScrollFldK to "plain"
- else
- if pNumb <> the iPrevHL of oIndexScroller then
- set the textStyle of field gIndxScrollFldK to "plain"
- end if
- if (pNumb > 0) and (pNumb <= the iColHeightK of oIndexScroller) then
- set the textStyle of line pNumb of field gIndxScrollFldK to "bold"
- set the iPrevHL of oIndexScroller to pNumb
- end if
- end if
- end
-